﻿<UserControl x:Class="CAION2.Views.ExtendedFilterForRecipesPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:viewModels="clr-namespace:CAION2.ViewModels" 
             xmlns:resources="clr-namespace:CAION2.Properties"
             xmlns:xctk="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d">

    <UserControl.DataContext>
        <viewModels:ExtendedFilterForRecipesDialogViewModel/>
    </UserControl.DataContext>

    <Grid Style="{StaticResource ContentRoot}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="7*"/>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="5*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Text="{x:Static resources:Resources.RR_RecipesFilterComparison}"
                   VerticalAlignment="Center"/>

        <xctk:IntegerUpDown Value="{Binding FilterRecipesMinLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Maximum="{Binding MaximumRecipesLevel}"
                            Minimum="1"
                            Grid.Column="1"
                            Width="50"
                            Height="20"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"/>

        <xctk:IntegerUpDown Value="{Binding FilterRecipesMaxLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Maximum="{Binding MaximumRecipesLevel}"
                            Minimum="1"
                            Grid.Column="2"
                            Width="50"
                            Height="20"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"/>

        <mui:ModernButton Command="{Binding ResetFilterCommand}"
                          CommandParameter="RecipesLevel"
                          Grid.Column="3"
                          ToolTip="{x:Static resources:Resources.RR_ResetFilter}"
                          IconData="{StaticResource ClearIcon}"
                          HorizontalAlignment="Right"
                          VerticalAlignment="Center"/>
        

        <TextBlock Text="{x:Static resources:Resources.RR_CharacterFilterComparison}"
                   Grid.Row="1"
                   VerticalAlignment="Center"/>

        <xctk:IntegerUpDown Value="{Binding FilterCharacterMinLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Maximum="{Binding MaximumCharacterLevel}"
                            Minimum="1"
                            Grid.Row="1"
                            Grid.Column="1"
                            Width="50"
                            Height="20"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"/>

        <xctk:IntegerUpDown Value="{Binding FilterCharacterMaxLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            Maximum="{Binding MaximumCharacterLevel}"
                            Minimum="1"
                            Grid.Row="1"
                            Grid.Column="2"
                            Width="50"
                            Height="20"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"/>

        <mui:ModernButton Command="{Binding ResetFilterCommand}"
                          CommandParameter="CharacterLevel"
                          Grid.Row="1"
                          Grid.Column="3"
                          ToolTip="{x:Static resources:Resources.RR_ResetFilter}"
                          IconData="{StaticResource ClearIcon}"
                          HorizontalAlignment="Right"
                          VerticalAlignment="Center"/>
            
        
        <CheckBox IsChecked="{Binding FilterElyosRecipes}"
                  Grid.ColumnSpan="2"
                  Grid.Row="2"
                  Tag="{Binding RedBorderFlag}"
                  Content="{x:Static resources:Resources.RR_FilterElyosRecipes}"/>

        <CheckBox IsChecked="{Binding FilterAsmodianRecipes}"
                  Grid.ColumnSpan="2"
                  Grid.Row="3"
                  VerticalAlignment="Top"
                  Tag="{Binding RedBorderFlag}"
                  Content="{x:Static resources:Resources.RR_FilterAsmodianRecipes}"/>
        
        <StackPanel Orientation="Vertical"
                    Grid.ColumnSpan="3"
                    Grid.Row="4">

            <CheckBox IsChecked="{Binding FilterQuality[0], UpdateSourceTrigger=PropertyChanged}"
                      Command="{Binding FilterQualityCommand}"
                      HorizontalAlignment="Left"
                      Margin="0,5,0,0"
                      Tag="{Binding RedBorderFlagQ}"
                      Content="{x:Static resources:Resources.RR_RecipesQualityNormal}"
                      BorderBrush="#D1D1D1"/>

            <CheckBox IsChecked="{Binding FilterQuality[1]}"
                      Command="{Binding FilterQualityCommand}"
                      Margin="0,5,0,0"
                      Tag="{Binding RedBorderFlagQ}"
                      Content="{x:Static resources:Resources.RR_RecipesQualityRare}"
                      BorderBrush="#48C23F"/>

            <CheckBox IsChecked="{Binding FilterQuality[2]}"
                      Command="{Binding FilterQualityCommand}"
                      Margin="0,5,0,0"
                      Tag="{Binding RedBorderFlagQ}"
                      Content="{x:Static resources:Resources.RR_RecipesQualityLegend}"
                      BorderBrush="#00ADEF"/>

            <CheckBox IsChecked="{Binding FilterQuality[3]}"
                      Command="{Binding FilterQualityCommand}"
                      Margin="0,5,0,0"
                      Tag="{Binding RedBorderFlagQ}"
                      Content="{x:Static resources:Resources.RR_RecipesQualityUnique}"
                      BorderBrush="#FFCC00"/>

            <CheckBox IsChecked="{Binding FilterQuality[4]}"
                      Command="{Binding FilterQualityCommand}"
                      Margin="0,5,0,0"
                      Tag="{Binding RedBorderFlagQ}"
                      Content="{x:Static resources:Resources.RR_RecipesQualityEpic}"
                      BorderBrush="#F79646"/>

            <CheckBox IsChecked="{Binding FilterQuality[5]}"
                      Command="{Binding FilterQualityCommand}"
                      Margin="0,5,0,0"
                      Tag="{Binding RedBorderFlagQ}"
                      Content="{x:Static resources:Resources.RR_RecipesQualityMythic}"
                      BorderBrush="#7316E8"/>

        </StackPanel>
                
    </Grid>
        
   
    
</UserControl>
